/*
 * @Author: szx
 * @Date: 2021-11-06 12:50:39
 * @LastEditTime: 2021-11-06 12:55:38
 * @Description: 
 * @FilePath: \leetcode\200-299\268\268.cpp
 */
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
class Solution {
public:
    int missingNumber(vector<int>& nums) {
        sort(nums.begin(),nums.end());
        for(int i =0;i<nums.size();i++){
            if(nums[i]!=i){
                return i;
            }
        }
        return nums.size();
    }
};
int main(){
    return 0;
}